package com.jrx.anytxn.param.service.partner;

import com.jrx.anytxn.common.exception.TxnBizException;
import com.jrx.anytxn.param.dto.partner.PartnerLimitAdjustmentReq;
import com.jrx.anytxn.param.dto.partner.PartnerLimitAdjustmentRes;
import com.jrx.anytxn.param.entity.*;

import java.io.IOException;
import java.util.List;

public interface IPartnerGeneralService {

    /**
     * 按照产品进行分润
     */
    void shareProfit(PrProductTable prProductTable) throws Exception;

    /**
     * 生成统计流水
     */
    TlPartnerGeneralLog createTlPartnerGeneralLog(String message) throws Exception;

    /**
     * 更新分润参数表 下一分润日期
     */
    void updateshareProfit(List<PrShareProfitTable> tableList, PrOrganizationTable organization);

    /**
     * 生成当日累计对账文件
     * @param table
     * @param basePath
     * @param today
     * @throws IOException
     */
    void createGeneralFile(PrProductTable table,String basePath,PrOrganizationTable org,String today) throws IOException;

    /**
     * 更新合作方当日限额
     * @param pmPartnerInfoList
     */
    void updatePartnerLimit(List<PmPartnerInfo> pmPartnerInfoList);

    /**
     * 更新合作方额度
     * @param req
     * @return
     * @throws TxnBizException
     */
    PartnerLimitAdjustmentRes partnerLimitAdjustment(PartnerLimitAdjustmentReq req);
}
